/**
 * 	write on 2005-10-29 23:21:26.
 */
package org.nanhill.xmlro.sro.model;


import org.nanhill.xmlro.Serializer;
import org.nanhill.xmlro.XmlroOutput;


/**
 * @author alin
 * 
 */
public class ShortArraySerializer implements Serializer {

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.nanhill.protocol.xmlro.Serializer#writeObject(java.lang.Object,
	 *      org.nanhill.protocol.xmlro.Output)
	 */
	public void writeObject(Object obj, XmlroOutput out) {
		short[] data = (short[]) obj;
		out.writeListBegin();
		out.writeListSize(data.length);
		for (short item : data)
			out.writeShort(item);
		out.writeListEnd();

	}

}
